<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>帖子管理</title>
<%@include file="../common/manageLink.jsp"%>
</head>
<body>
<%@include file="../common/managerHeader.jsp"%>
<div class="container-fluid-full">
    <div class="row-fluid">

        <%@include file="../common/managerLeft.jsp"%>
        <!-- start: Content -->
        <div id="content" class="span10">


            <ul class="breadcrumb">
                <li>
                    <i class="icon-home"></i>
                    <a href="index.html">主页</a>
                    <i class="icon-angle-right"></i>
                </li>
                <li><a href="#">帖子管理</a></li>
            </ul>

            <div class="row-fluid sortable">
                <div class="box span12">
                    <div class="box-header" data-original-title>
                        <h2><i class="halflings-icon white user"></i><span class="break"></span>帖子</h2>
                         <div class="box-icon">
							<a class="btn-close" href="${pageContext.request.contextPath}/postmanage/postManageAddPost"><i class="halflings-icon white zoom-in"></i></a>
                        </div>
                    </div>
                    <div class="box-content">
                        <table class="table table-striped table-bordered bootstrap-datatable">
                            <thead>
                            <tr>
                                <th>帖子ID</th>
                                <th>发帖用户id</th>
                                <th>帖子标题</th>
                                <th>帖子内容</th>
                                <th>发帖时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <c:if test="${!empty allPost}">
                           	<c:forEach items="${allPost}" var="post">
                           	<tr>
                           	<td>${post.postId}</td>
                           	<td>${post.userId}</td>
                           	<td>${post.postTitle}</td>
                           	<td>${post.postMain}</td>
                           	<td>${post.postTime}</td>
                            <td class="center">
                                <a class="btn btn-info" href="${pageContext.request.contextPath}/postmanage/changePostPage?postId=${post.postId}">
                                   <i class="halflings-icon white edit"></i>
                                </a>
                                <a type="submit" class="btn btn-danger" href="${pageContext.request.contextPath}/postmanage/delpost?id=${post.postId}">
                                   <i class="halflings-icon white trash"></i>
                                </a>
                            </td>
                           	</tr>
                           	</c:forEach>
                            </c:if>
                            </tbody>
                        </table>
                    </div>
                </div><!--/span-->

            </div><!--/row-->



        </div><!--/.fluid-container-->

        <!-- end: Content -->
    </div><!--/#content.span10-->
</div><!--/fluid-row-->

<div class="clearfix"></div>

<footer>

    <p>
        <span style="text-align:left;float:left">&copy; 2017 <a href="#" alt="">帮帮取管理系统</a></span>

    </p>

</footer>
</body>
</html>